﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace MyPhotoIndex.Interfaces
{
    public enum SelectedImageSelectionMethod { Unknown = 0, Mouse = 1, Keyboard = 2 };
    public enum SelectedImageSelectedState { Unknown = 0, Select = 1, Unselect = 2 };

    public class SelectedImageInfo : EventArgs
    {
        public SelectedImageInfo(int imageId, SelectedImageSelectedState selectionState, SelectedImageSelectionMethod selectionMethod, Point originalClickLocation ,PointF clickLocationRatio)
        {
            m_imageId = imageId;
            m_selectionState = selectionState;
            m_selectionMethod = selectionMethod;
            m_clickLocationRatio = clickLocationRatio;
            m_originalClickLocation = originalClickLocation;
        }

        private static SelectedImageInfo ms_empty = new SelectedImageInfo(-1, SelectedImageSelectedState.Unknown, SelectedImageSelectionMethod.Unknown, Point.Empty, PointF.Empty);

        public static new SelectedImageInfo Empty
        {
            get
            {
                return ms_empty;
            }
        }

        private SelectedImageSelectionMethod m_selectionMethod;

        public SelectedImageSelectionMethod SelectionMethod
        {
            get { return m_selectionMethod; }
            set { m_selectionMethod = value; }
        }

        private Point m_originalClickLocation;

        public Point OriginalClickLocation
        {
            get { return m_originalClickLocation; }
            set { m_originalClickLocation = value; }
        }

        private PointF m_clickLocationRatio;

        public PointF ClickLocationRatio
        {
            get { return m_clickLocationRatio; }
            set { m_clickLocationRatio = value; }
        }

        private int m_imageId;

        public int ImageId
        {
            get { return m_imageId; }
            set { m_imageId = value; }
        }

        private SelectedImageSelectedState m_selectionState;

        public SelectedImageSelectedState SelectionState
        {
            get { return m_selectionState; }
            set { m_selectionState = value; }
        }
    }
}
